<!--
 * @Description: 浮动布局
 * @Author: rendc
 * @Date: 2025-09-15 14:13:50
 * @LastEditors: rendc
 * @LastEditTime: 2025-09-15 14:27:16
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>浮动布局</title>
  <style>
    body {
      /* 清除默认样式 */
      margin: 0;
    }

    #app {
      /* border: 1px solid red; */
      height: 200px;

    }

    .left,
    .right {
      border: 1px solid greenyellow;
      width: calc(50% - 2px);
      height: 200px;
    }

    .left {
      /* 浮动布局 左浮动 */
      float: left;
    }

    .right {
      /* 浮动布局 右浮动 */
      float: right;
    }
  </style>
</head>

<body>
  <div id="app">
    <div class="left">左</div>
    <div class="right">右</div>
  </div>
  <div>app下面的文字</div>
</body>

</html>